<template>
    <div>
        <Authc permissions="trade:settlement:cmb">
            <div>
                <a style="margin: 0 4px;" @click="handleDetail('clearingAbnormal')" v-if="isShowDiffBtn">异常明细</a>
                <a @click="handleDetail('clearingDetele')">清分明细</a>
            </div>
        </Authc>
    </div>
</template>
<script>
import { Icon, Tooltip, Message, Modal } from "view-design";
import Authc from "@/components/Authc";

export default {
    props: {
        row: Object,
        isShowDiffBtn: Boolean
    },
    model: {
        event: ["onEdit"]
    },
    components: {
        Icon,
        Tooltip,
        Message,
        Authc
    },
    data: function() {
        return {
            // isShowDiffBtn: false
        };
    },
    created() {
        // if ( this.row.diffMerchantCount || this.row.diffSubOrderCount || this.row.diffOrderCount || this.row.diffClearAmountCount ) {
        //     this.isShowDiffBtn = true;
        // }
    },
    methods: {
        handleDetail(type) {
            // console.log( this.$props.row)
            let data = this.$props.row.clearDate;
            switch (type) {
                case "clearingDetele":
                     this.$router.push({
                        path: 'clearingDetele',
                        query: {
                            clearDate: data,
                            type: '明细对账'
                            // reconciliationStatus: 'success'
                        }
                    });
                    break;
                case "clearingAbnormal":
                    this.$router.push({
                        path: 'clearingAbnormal',
                        query: {
                            clearDate: data,
                            // reconciliationStatus: 'success'
                        }
                    });
                    break;
                default:
            }
        }
    }
};
</script>
<style lang="less">
.normal-icon-style {
    font-size: 20px !important;
    color: #57a3f3 !important;
}

.error-icon-style {
    font-size: 20px !important;
    color: #ff0000 !important;
}
</style>
